package com.methods;

/**
 * Dog类
 * 描述：继承Animal类，饿汉式
 * 2017/8/19.
 * @author Erik
 * @version 0.1
 * @since JDK1.8
 * @see com.methods.Animal
 */
public class Dog extends Animal {
    private Dog(){}
    private static Dog dog=new Dog();
    public static Dog getDog(){ return dog;}

    @Override
    public void cry() { System.out.println("小狗的叫声：汪汪汪~~~"); }
}
